const joi = require('joi')

const username = joi.string().alphanum().min(3).max(12).required()

const password = joi.string().pattern(/^[\S]{6,12}$/).required()

exports.register_login_schema = {
    // 对 post的请求体进行校验
    body: {
        username,
        password,
    }
}